{% include custom/sidebarconfigs.html %}


<ul id="mysidebar" class="nav">
    <!--start search-->
    <div id="search-demo-container">
            <input type="text" id="search-input" placeholder="{{site.data.strings.search_placeholder_text}}">
            <ul id="results-container"></ul>
        </div>
        <script src="{{ site.urlprefix }}/js/jekyll-search.js" type="text/javascript"></script>
        <script type="text/javascript">
            SimpleJekyllSearch.init({
                searchInput: document.getElementById('search-input'),
                resultsContainer: document.getElementById('results-container'),
                {% if site.urlprefix == "" %}
                dataSource: '{{ "/search.json" }}',
                {% else %}
                dataSource: '{{site.urlprefix}}{{ "/search.json" }}',
                {% endif %}
                searchResultTemplate: '<li><a href="{url}" title="{{page.title | replace: "'", "\"}}">{title}</a></li>',
                noResultsText: '<li><a class="empty">{{site.data.strings.search_no_results_text}}</a></li>',
                limit: 10,
                fuzzy: true
            });
        </script>
        <!--end search-->
    <li class="sidebarTitle">{{sidebar[0].product}} {{sidebar[0].version}}</li>
    {% for entry in sidebar %}
    {% for folder in entry.folders %}
    {% if folder.output contains "web" %}
    <li>
        <a href="#">{{ folder.title }}</a>
        <ul>
            {% for folderitem in folder.folderitems %}
            {% if folderitem.output contains "web" %}
            {% if folderitem.external_url %}
            <li><a href="{{folderitem.external_url}}" target="_blank">{{folderitem.title}}</a></li>
            {% elsif page.url == folderitem.url %}
            <li class="active"><a href="{{site.urlprefix}}{{folderitem.url}}">{{folderitem.title}}</a></li>
            {% else %}
            <li><a href="{{site.urlprefix}}{{folderitem.url}}">{{folderitem.title}}</a></li>
            {% endif %}
            {% for subfolders in folderitem.subfolders %}
            {% if subfolders.output contains "web" %}
            <li class="subfolders">
                <a href="#">{{ subfolders.title }}</a>
                <ul>
                    {% for subfolderitem in subfolders.subfolderitems %}
                    {% if subfolderitem.output contains "web" %}
                    {% if subfolderitem.external_url %}
                    <li><a href="{{subfolderitem.external_url}}" target="_blank">{{subfolderitem.title}}</a></li>
                    {% elsif page.url == subfolderitem.url %}
                    <li class="active"><a href="{{site.urlprefix}}{{subfolderitem.url}}">{{subfolderitem.title}}</a></li>
                    {% else %}
                    <li><a href="{{site.urlprefix}}{{subfolderitem.url}}">{{subfolderitem.title}}</a></li>
                    {% endif %}
                    {% endif %}
                    {% endfor %}
                </ul>
            </li>
            {% endif %}
            {% endfor %}
            {% endif %}
            {% endfor %}
        </ul>
        {% endif %}
        {% endfor %}

        {% for item in entry.items %}
        <li>
            {% if item.external_url %}
            <li><a href="{{item.external_url}}" target="_blank">{{item.title}}</a></li>
            {% elsif page.url == item.url %}
            <li class="active"><a href="{{site.urlprefix}}{{item.url}}">{{item.title}}</a></li>
            {% else %}
            <li><a href="{{site.urlprefix}}{{item.url}}">{{item.title}}</a></li>
            {% endif %}
        </li>
        {% endfor %}
        {% endfor %}
        <!-- if you aren't using the accordion, uncomment this block:
           <p class="external">
               <a href="#" id="collapseAll">Collapse All</a> | <a href="#" id="expandAll">Expand All</a>
           </p>
           -->
    </li>
</ul>

<!-- this highlights the active parent class in the navgoco sidebar. this is critical so that the parent expands when you're viewing a page. This must appear below the sidebar code above. Otherwise, if placed inside customscripts.js, the script runs before the sidebar code runs and the class never gets inserted.-->
<script>$("li.active").parents('li').toggleClass("active");</script>
